package com.authine.cloudpivot.ext.enums.kingdee;

/**
 * @Author: 李国祥
 * @Date: 2019/11/21 9:25
 * @Version 1.0
 */
public enum KingDeePaymentApplyType {

    ALL(0, "全部",0),
    BALANCE(1, "余额付款",0),
    BANK(2, "银行转账",27),
    MONEY(3, "现金",33),
    PAPER_BILL_OF_EXCHANGE(4, "银行承兑汇票",29),
    ELECTRONIC_BILL_OF_EXCHANGE(5, "电子承兑支票",29),
    ALI_PAY(6, "支付宝",28);


    public Integer id;
    public String text;
    public Integer subject;


    private KingDeePaymentApplyType(Integer id, String text,Integer subject) {

        this.id = id;
        this.text = text;
        this.subject = subject;

    }

    public static KingDeePaymentApplyType get(Integer code) {

        for (KingDeePaymentApplyType c : KingDeePaymentApplyType.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }
}
